#include <iostream>
#include <string>
using namespace std;

struct A
{
    double num = 0;
    A() = default;
    A(int);
    \\将类转换为int
    operator int() const { return num; }
    /* data */
};
A::A(int a) { num = a; }
int main(int argc, const char **argv)
{
    A a;
    A a2 = 10;
    cout << a << endl;
    cout << a2 << endl;
    return 0;
}
